#include<stdio.h>
#include<algorithm>
using namespace std;
struct GasStation{
    double dist;
    double price;
};
bool msort(const GasStation* a, const GasStation* b){
    return a->dist<b->dist;
}
int main(){
    double Cmax,D,Davg;
    int N;
    scanf("%lf %lf %lf %d",&Cmax,&D,&Davg,&N);
    GasStation* gasstations[N+1];
    int i=0;
    while(i<N){
        GasStation* gs = new GasStation();
        scanf("%lf %lf",&(gs->price),&(gs->dist));
        gasstations[i]=gs;
        i++;
    }
    GasStation* destination = new GasStation();
    destination->price=0;
    destination->dist=D;
    gasstations[N]=destination;
    sort(gasstations, gasstations+N, msort);
    //printf("=====================================\n");
    //for(i=0;i<N+1;i++){
    //    printf("%d %.2lf %.2lf\n",i,gasstations[i]->dist,gasstations[i]->price);
    //}
    if(gasstations[0]->dist>0.0){
        printf("The maximum travel distance = %.2f\n",0);
        return 0;
    }

    double curTank=0;
    int curPos=0;
    int lastPos=0;
    double totalCost=0;
    double curPrice=0;
    i=0;
    while(i<N){
        curPos=gasstations[i]->dist;
        curTank-=(curPos-lastPos)/Davg;
        curPrice=gasstations[i]->price;
        int nearestCheaperStationIndex=-1;
        int cheapestStationIndex=-1;
        double cheapestPrice=0x7fffffff;

        int j=i+1;
        for(;j<N+1;j++){
            if(gasstations[j]->dist<=curPos+Cmax*Davg){
                if(nearestCheaperStationIndex<0){
                    if(gasstations[j]->price<gasstations[i]->price){
                        nearestCheaperStationIndex=j;
                    }else if(gasstations[j]->price<=cheapestPrice){
                        cheapestPrice=gasstations[j]->price;
                        cheapestStationIndex = j;
                    }
                }else
                    break;
            }else{
                break;
            }
        }
        if(j==i+1){
            printf("The maximum travel distance = %.2f\n",curPos+Cmax*Davg);
            return 0;
        }
        if(nearestCheaperStationIndex>0){
            double tmp = (gasstations[nearestCheaperStationIndex]->dist-curPos)/Davg - curTank;
            totalCost+= tmp *curPrice;
            curTank+=tmp;
            lastPos=curPos;
            i=nearestCheaperStationIndex;
        }else{
            totalCost+=curPrice*(Cmax-curTank);
            curTank=Cmax;
            lastPos=curPos;
            i=cheapestStationIndex;
        }
    }
    printf("%.2f\n",totalCost);

    return 0;
}
